home *** CD-ROM | disk | FTP | other *** search
/ Aminet 50 / Aminet 50 (2002)(GTI - Schatztruhe)[!][Aug 2002].iso / Aminet / text / edit / tecoc-146.lha / exen.c < prev    next >
C/C++ Source or Header  |  1991-07-05  |  1KB  |  47 lines

  1. /*****************************************************************************
  2.  
  3.     ExeN()
  4.  
  5.     This function executes an N command.
  6.  
  7.     nNtext$        Global search
  8. *****************************************************************************/
  9.  
  10. #include "zport.h"        /* define portability identifiers */
  11. #include "tecoc.h"        /* define general identifiers */
  12. #include "defext.h"        /* define external global variables */
  13. #include "deferr.h"        /* define identifiers for error messages */
  14.  
  15. DEFAULT ExeN()            /* execute an N command */
  16. {
  17.     DBGFEN(1,"ExeN",NULL);
  18.  
  19. /*
  20.  * The command m,nN is illegal: the user should use m,nFB
  21.  */
  22.  
  23.     if (CmdMod & MARGIS) {            /* if it's m,nN */
  24.         ErrStr(ERR_ILL, "m,nN");        /* illegal command "m,nN" */
  25.     DBGFEX(1,DbgFNm,"FAILURE");
  26.     return FAILURE;
  27.     }
  28.  
  29.     if (CmdMod & DCOLON) {            /* if it's ::N */
  30.         ErrStr(ERR_ILL, "::N");            /* illegal command "::N" */
  31.     DBGFEX(1,DbgFNm,"FAILURE");
  32.     return FAILURE;
  33.     }
  34.  
  35.     SrcTyp = N_SEARCH;
  36.  
  37.     if (Search(FALSE) == FAILURE) {
  38.         DBGFEX(1,DbgFNm,"FAILURE");
  39.     return FAILURE;
  40.     }
  41.  
  42.     CmdMod = '\0';                /* clear modifiers flags */
  43.  
  44.     DBGFEX(1,DbgFNm,"SUCCESS");
  45.     return SUCCESS;
  46. }
  47.